﻿using SimStatus.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SimStatus.UI.Errors
{
    /// <summary>
    /// Status.xaml 的交互逻辑
    /// </summary>
    public partial class Status : UserControl, IContent
    {
        public Status()
        {
            InitializeComponent();
            this.Loaded += Status_Loaded;
        }

        void Status_Loaded(object sender, RoutedEventArgs e)
        {
            this.Retry.Click += Retry_Click;
        }

        void Retry_Click(object sender, RoutedEventArgs e)
        {
            if (Retry_Click_Event != null)
            {
                Retry_Click_Event.Invoke(sender, e);
            }
        }

        public event EventHandler Retry_Click_Event;
        public String Msg
        {
            get { return this.blk_Msg.Text; }
            set { this.blk_Msg.Text = value; }

        }

        public String Content
        {
            get { return this.txt_content.Text; }
            set { this.txt_content.Text = value; }
        }

        public IMainPage main
        {
            get;
            set;
        }
    }
}
